<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBusinessGroupTable extends Migration
{
    /**
     * Run the migrations.
     * 业务组
     * @return void
     */
    public function up()
    {
        Schema::create('business_group', function (Blueprint $table) {
		    $table->increments('id');
	        $table->string('name')->comment('业务组名称');
	        $table->tinyInteger('department_id')->comment('负责人部门');
	        $table->integer('leader')->comment('业务组负责人id');
	        $table->string('leader_name')->comment('业务组负责人姓名');
	        $table->integer('company_id')->comment('所属公司id')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('business_group');
    }
}
